
package ch.ethz.ssh2.transport;

import android.util.Log;

public final class CldUtils {
	private static final String TAG = "CldUtils";
	
	public static String comp_algo = null;
	public static void setCompressorAlgo(String algo){
		Log.e( TAG, "<bmt_test> setCompressorAlgo : " + algo);
		comp_algo = algo;
	}

	public static String cipher_algo = null;
	public static byte[] key = null;
	public static byte[] iv = null;
	public static void setCipherAlgo(String algo, byte[] key_in, byte[] iv_in){
		Log.e( TAG, "<bmt_test> setCipherAlgo : " + algo);
		cipher_algo = algo;

		if(key == null){
			key = new byte[key_in.length];
		}

		if(iv == null){
			iv = new byte[iv_in.length];
		}

        System.arraycopy(key_in, 0, key, 0, key_in.length);
		System.arraycopy(iv_in, 0, iv, 0, iv_in.length);
	}

	public static String mac_algo = null;
	public static byte[] mac_key = null;
	public static void setMacAlgo(String algo, byte[] key){
		Log.e( TAG, "<bmt_test> setCipherAlgo : " + algo);
		mac_algo = algo;

		if(mac_key == null){
			mac_key = new byte[key.length];
		}

        System.arraycopy(key, 0, mac_key, 0, key.length);
	}
}